<div class="bjui-pageContent">
    <fieldset>
        <legend>{{$item->name}}</legend>
        <table class="table table-bordered">
            <tbody>
            <tr>
                <td class="col-sm-2 right">名称：</td>
                <td>{{$item->name}}</td>
            </tr>
            <tr>
                <td class="right">类型：</td>
                <td>{{$item->typeName()}}</td>
            </tr>
            <tr>
                <td class="right">{{$item->typeName()}}时间：</td>
                <td>{{$item->findLostTime()}}</td>
            </tr>
            <tr>
                <td class="right">用户：</td>
                <td>{{$item->user->name}}</td>
            </tr>
            <tr>
                <td class="right">分类：</td>
                <td>{{$item->p_catalog->name . '-' . $item->catalog->name}}</td>
            </tr>
            <tr>
                <td class="right">详细地址：</td>
                <td>{{$item->address()}}</td>
            </tr>
            <tr>
                <td class="right">发布时间：</td>
                <td>{{$item->created_at}}</td>
            </tr>
            <tr>
                <td class="right">期望酬金：</td>
                <td>{{$item->wanted_fee}}</td>
            </tr>
            <tr>
                <td class="right">状态：</td>
                <td>@if($item->match)已@else未@endif匹配</td>
            </tr>
            <tr>
                <td class="right">详细描述：</td>
                <td>{{$item->describe}}</td>
            </tr>
            <tr>
                <td class="right">图片：</td>
                <td>
                    @if($images = $item->images)
                        <div id="item_images" class="carousel slide" data-ride="carousel">
                            <div class="carousel-inner" role="listbox">
                                @foreach($images as $key => $image)
                                    <div class="item <?=$key == 0 ? 'active' : ''?>">
                                        <img src="{{$image->url}}">
                                    </div>
                                @endforeach
                            </div>
                            <a class="left carousel-control" href="#item_images" role="button"
                               data-slide="prev">
                                <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
                                <span class="sr-only">Previous</span>
                            </a>
                            <a class="right carousel-control" href="#item_images" role="button"
                               data-slide="next">
                                <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
                                <span class="sr-only">Next</span>
                            </a>
                        </div>
                    @endif
                </td>
            </tr>
            </tbody>
        </table>
    </fieldset>
    @if($matchItem = $item->matchItem())
        <fieldset>
            <legend>匹配物品：{{$matchItem->name}}</legend>
            <table class="table table-bordered">
                <tbody>
                <tr>
                    <td class="col-sm-2 right">名称：</td>
                    <td>{{$matchItem->name}}</td>
                </tr>
                <tr>
                    <td class="right">类型：</td>
                    <td>{{$matchItem->typeName()}}</td>
                </tr>
                <tr>
                    <td class="right">{{$matchItem->typeName()}}时间：</td>
                    <td>{{$matchItem->findLostTime()}}</td>
                </tr>
                <tr>
                    <td class="right">用户：</td>
                    <td>{{$matchItem->user->name}}</td>
                </tr>
                <tr>
                    <td class="right">分类：</td>
                    <td>{{$matchItem->p_catalog->name . '-' . $matchItem->catalog->name}}</td>
                </tr>
                <tr>
                    <td class="right">详细地址：</td>
                    <td>{{$matchItem->address()}}</td>
                </tr>
                <tr>
                    <td class="right">发布时间：</td>
                    <td>{{$matchItem->created_at}}</td>
                </tr>
                <tr>
                    <td class="right">期望酬金：</td>
                    <td>{{$matchItem->wanted_fee}}</td>
                </tr>
                <tr>
                    <td class="right">详细描述：</td>
                    <td>{{$matchItem->describe}}</td>
                </tr>
                <tr>
                    <td class="right">图片：</td>
                    <td>
                        @if($images = $matchItem->images)
                            <div id="item_images" class="carousel slide" data-ride="carousel">
                                <div class="carousel-inner" role="listbox">
                                    @foreach($images as $key => $image)
                                        <div class="item <?=$key == 0 ? 'active' : ''?>">
                                            <img src="{{$image->url}}">
                                        </div>
                                    @endforeach
                                </div>
                                <a class="left carousel-control" href="#item_images" role="button"
                                   data-slide="prev">
                                    <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
                                    <span class="sr-only">Previous</span>
                                </a>
                                <a class="right carousel-control" href="#item_images" role="button"
                                   data-slide="next">
                                    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
                                    <span class="sr-only">Next</span>
                                </a>
                            </div>
                        @endif
                    </td>
                </tr>
                </tbody>
            </table>
        </fieldset>
    @endif
</div>